package com.ruicar.afs.cloud.apply.pre.loan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruicar.afs.cloud.apply.common.entity.ApplyModifyHistory;
import com.ruicar.afs.cloud.apply.common.entity.ApplyOprRecord;
import com.ruicar.afs.cloud.apply.pre.loan.condition.ApplyReportCondition;
import com.ruicar.afs.cloud.apply.pre.loan.condition.AssetChangeCondition;
import com.ruicar.afs.cloud.apply.pre.loan.condition.CarInfoCondition;
import com.ruicar.afs.cloud.apply.pre.loan.vo.CarInfoVO;
import com.ruicar.afs.cloud.bizcommon.business.bean.FinanceCalculatorBean;
import com.ruicar.afs.cloud.bizcommon.business.dto.CalculatorDTO;
import com.ruicar.afs.cloud.common.core.util.IResponse;

import java.util.List;

/**
 * 资产变更service
 *
 * @author 耿继辉
 */
public interface ApplyModifyHistoryService extends IService<ApplyModifyHistory> {

    /**
     * 资产变更后数据留痕,并保存操作记录
     *
     * @param applyNo 申请编号
     */
    ApplyOprRecord assertChange(String applyNo, String applyStatus);

    /**
     * 版本号为空-查询历史版本号
     * @param applyNo
     * @return
     */
    public ApplyModifyHistory getModifyHistory(String applyNo);

    /**
     * 车辆信息-资产信息
     * @param vo
     * @param condition
     */
    public CarInfoVO getCarInfoForAssetChange(CarInfoVO vo, ApplyReportCondition condition);

    /**
     * 更新修改后对象
     * @param applyNo
     * @param inList
     * @param carInfoCondition
     */
    public ApplyModifyHistory updateBodyContent(String applyNo, List<CalculatorDTO> inList, CarInfoCondition carInfoCondition);

    /**
     * 金融产品-资产变更
     * @param condition
     */
    public FinanceCalculatorBean getFinancialProductsForAssetChange(FinanceCalculatorBean vo, CalculatorDTO condition);

    /**
     * 获取资产变更历史数据
     * @param applyNo
     * @return
     */
    public ApplyModifyHistory getModifyHistoryByApplyNo(String applyNo);

    /**
     * 获取最大版本号
     * @param applyNo
     * @return
     */
    public Integer getMaxVersion(String applyNo);

    /**
     * 金融产品校验
     * @param condition
     * @return
     */
    public IResponse checkProductInfoForAsset(AssetChangeCondition condition);

}
